Accusoft.ImagXpressSdk Namespace > ImageReduce Class > JpegReduce Method : JpegReduce(ImagXpress,Byte[],Byte[],Int32,TransformMode) Method |
Note: The default value is 22 for strong compression improvement while maintaining very good quality. The range is from 0-32, where 0 represents almost no compression improvement and 32 represents the most compression improvement with some quality loss.
Note: The default value is TransformMode.None.
When transformMode is TransformMode.None the output JPEG format will match the input JPEG format.
When transformMode is TransformMode.ToProgressiveJpeg, the output JPEG format will be progressive JPEG. Note: Transforming Sequential to Progressive may result in a small increase in size.
When transformMode is TransformMode.ToSequentialJpeg, the output JPEG format will be sequential JPEG. Note: Transforming Progressive to Sequential may result in a small increase in size.
'Declaration Public Overloads Shared Sub JpegReduce( _ ByVal imagXpress As ImagXpress, _ ByVal inputJpegData() As Byte, _ ByRef outputJpegData As Byte(), _ Optional ByVal qualityFactor As Integer, _ Optional ByVal transformMode As TransformMode _ )
'Usage Dim imagXpress As ImagXpress Dim inputJpegData() As Byte Dim outputJpegData As Byte() Dim qualityFactor As Integer Dim transformMode As TransformMode ImageReduce.JpegReduce(imagXpress, inputJpegData, outputJpegData, qualityFactor, transformMode)
public static void JpegReduce( ImagXpress imagXpress, byte[] inputJpegData, out byte[] outputJpegData, int qualityFactor, TransformMode transformMode )
public: static void JpegReduce( ImagXpress* imagXpress, byte[]* inputJpegData, [PARAMFLAG::Out] byte[] outputJpegData, int qualityFactor, TransformMode transformMode )
public: static void JpegReduce( ImagXpress^ imagXpress, array<byte>^ inputJpegData, [Out] array<byte> outputJpegData, int qualityFactor, TransformMode transformMode )
Note: The default value is 22 for strong compression improvement while maintaining very good quality. The range is from 0-32, where 0 represents almost no compression improvement and 32 represents the most compression improvement with some quality loss.
Note: The default value is TransformMode.None.
When transformMode is TransformMode.None the output JPEG format will match the input JPEG format.
When transformMode is TransformMode.ToProgressiveJpeg, the output JPEG format will be progressive JPEG. Note: Transforming Sequential to Progressive may result in a small increase in size.
When transformMode is TransformMode.ToSequentialJpeg, the output JPEG format will be sequential JPEG. Note: Transforming Progressive to Sequential may result in a small increase in size.
Exception | Description |
---|---|
System.ArgumentNullException | Thrown when imagXpress is null. |
System.ArgumentNullException | Thrown when inputJpegData is null. |
System.ArgumentOutOfRangeException | Thrown when qualityFactor is outside range [0,32]. |
ImagXpressException | Thrown when imagXpress is not licensed for this feature. |
ImagXpressException | Thrown when inputJpegData refers to a damaged or incomplete JPEG. |
ImagXpressException | Thrown when inputJpegData does not refer to a 8-bit grayscale or 24-bit color JPEG. |
Note: Supports reading 8-bit grayscale and 24-bit color JPEGs.